package com.drinks.yiniang.common.banner;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import com.drinks.yiniang.R;
import com.drinks.yiniang.utils.GlideUtils;
import com.hansen.library.ui.widget.banner.holder.BannerViewHolder;
import com.hansen.library.ui.widget.image.RatioRoundImageView;

/**
 * @author han
 * @date 2019/12/7
 */
public class MfrsBannerViewHolder implements BannerViewHolder<String> {

    private RatioRoundImageView iv_goods_detail_pic;

    @Override
    public View createView(Context context) {
        View mView = LayoutInflater.from(context).inflate(R.layout.item_header_banner, null);

        iv_goods_detail_pic = mView.findViewById(R.id.iv_header_banner);

        return mView;
    }

    @Override
    public void onBind(Context context, int position, String data) {
        //数据绑定
        //final int pos = position;

        GlideUtils.loadSquareImage(context, iv_goods_detail_pic, data);
    }
}